﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="feerule_1.aspx.cs" Inherits="qy_54tss_Admin_activeindexlinklist_delivershiftslist" %>

<%@ Register Src="~/Admin/Banner.ascx" TagName="TogoBanner" TagPrefix="uc1" %>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<%@ Register Src="~/Admin/Foot.ascx" TagName="Foot" TagPrefix="uc2" %>
<%@ Register Src="~/Admin/Adleft.ascx" TagName="left" TagPrefix="uc3" %>
<%@ Register TagPrefix="epc" Namespace="Hangjing.Control" Assembly="Hangjing.Control" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>配送费规则管理-<%= WebUtility.GetMyName()%></title>
    <link href="../css/reset.css" rel="stylesheet" type="text/css" />
    <link href="../css/menu.css" rel="stylesheet" type="text/css" />
    <link href="../css/boxes.css" rel="stylesheet" type="text/css" />
    <link href="../css/Validator.css" rel="stylesheet" type="text/css" />
    <link href="../css/Common.css" rel="stylesheet" type="text/css" />
    <!--[if IE]>
    <link rel="stylesheet" type="text/css" href="../css/iestyles.css" media="all" />
    <![endif]-->
    <!--[if lt IE 7]>
    <link rel="stylesheet" type="text/css" href="../css/below_ie7.css" media="all" />
    <![endif]-->
    <!--[if IE 7]>
    <link rel="stylesheet" type="text/css" href="../css/ie7.css" media="all" />
    <![endif]-->
    <link href="../css/shopadmin.css" rel="stylesheet" type="text/css" />
    <link href="../css/time.css" rel="stylesheet" type="text/css" />

    <script type="text/javascript" src="../javascript/DatePicker/WdatePicker.js"></script>

    <script src="../javascript/jquery-1.3.2.js" type="text/javascript"></script>

    <script src="../javascript/Common.js" type="text/javascript"></script>

    <script src="../javascript/ShowDivDialog.js" type="text/javascript"></script>
        <script src="../javascript/time.js?v=1" type="text/javascript"></script>
    <script language="javascript" type="text/javascript">

        AddLoadFun(init);

        var Table;
        function init() {
            // Table = new CheckTable("rptsubItem");
            $("#rptsubItem tr").mouseover(function () { $(this).addClass("on-mouse"); }).mouseout(function () { $(this).removeClass("on-mouse"); });
            $("#rptsubItem tr:even").addClass("even pointer");
            $("#loading-mask").hide();
            Request =
            {
                QueryString: function (item) {
                    var svalue = location.search.match(new RegExp("[\?\&]" + item + "=([^\&]*)(\&?)", "i"));
                    return svalue ? svalue[1] : svalue;
                }
            }
            $("#A" + Request.QueryString("id")).addClass("active");
        }

        function Del() {
            var nums = Table.GetChecks();
            if (nums == undefined || nums.length == 0) {
                alert("请选择要删除的记录!");
                return false;
            }
            document.getElementById("hdDels").value = ArrayToString(nums);
            return DelConfirm();
        }

        function jDel() {
            var nums = Table.GetChecks();
            if (nums == undefined || nums.length == 0) {
                alert("请选择要操作的记录!");
                return false;
            }
            document.getElementById("hdDels").value = ArrayToString(nums);
            return true;
        }


        function loading() {
            $("#loading-mask").show();
        }

        function loadover() {
            $("#loading-mask").hide();
        }


        function scanerProduct(tid) {
            window.open('../../ticket/showticket.aspx?id=' + tid);
        }

        function showmap(aid) {
            var iTop = (window.screen.availHeight - 30 - 400) / 2;       //获得窗口的垂直位置;
            var iLeft = (window.screen.availWidth - 10 - 600) / 2;        //获得窗口的水平位置;
            window.open("wxitemuploadpic.aspx?id=" + aid, "newwindow", "height=360, width=400, toolbar =no, menubar=no, scrollbars=no, resizable=no, location=no, status=no,top=" + iTop + ",left=" + iLeft);
        }


    </script>

    <style type="text/css">
        .grid th {
            border: 1px solid #DADFE0;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
        <asp:HiddenField ID="hdDels" runat="server" />
        <epc:Hint ID="Hint1" runat="server" HintImageUrl="../images/Control" />
        <div class="wrapper">
            <!--banner start-->
            <uc1:TogoBanner runat="server" ID="Banner" />
            <!--banner end-->
            <!--center start-->
            <div class="middle" id="anchor-content">
                <div id="page:main-container">
                    <div class="columns ">
                        <div class="side-col" id="page:left">
                            <uc3:left runat="server" ID="left" />
                        </div>
                        <div class="main-col" id="content">
                            <asp:ScriptManager ID="ScriptManager1" runat="server">
                            </asp:ScriptManager>
                            <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                                <ContentTemplate>
                                    <div class="main-col-inner">
                                        <div id="divMessages">
                                        </div>


                                          <ul id="diagram_tab" class="tabs-horiz" style="border-bottom: none">
                                            <li><a href="ShopDetail.aspx?id=<%= Request["tid"] %>" class="tab-item-link ">
                                                <span><span class="changed"></span><span class="error"></span>商家信息</span> </a>
                                            </li>

                                                <li><a href="feerule.aspx?tid=<%= Request["tid"] %>" class="tab-item-link "><span>
                                                <span class="changed"></span><span class="error"></span>配送费规则</span> </a></li>

                                            <li><a href="feerule.aspx?tid=<%= Request["tid"] %>" class="tab-item-link active"><span>
                                                <span class="changed"></span><span class="error"></span>旧配送费规则</span> </a></li>

                                                <li><a href="Distancepaylist.aspx?tid=<%= Request["tid"] %>" class="tab-item-link "><span>
                                                <span class="changed"></span><span class="error"></span>微信配送费规则</span> </a></li>



                                            <li><a href="ShopLocal.aspx?tid=<%= Request["tid"] %>" class="tab-item-link "><span>
                                                <span class="changed"></span><span class="error"></span>地图定位</span> </a></li>

                                        </ul>

                                        <div class="scott">
                                            <webdiyer:AspNetPager CssClass="anpager" ID="AspNetPager1" runat="server" Width="100%"
                                                CustomInfoHTML="共有记录 <font>%RecordCount%</font> 条 当前为 <font>%CurrentPageIndex%</font>/<font>%PageCount%</font> 页"
                                                HorizontalAlign="Right" ShowCustomInfoSection="Left" CustomInfoTextAlign="Right"
                                                CustomInfoSectionWidth="28%" ShowPageIndexBox="Always" PageIndexBoxType="TextBox"
                                                TextBeforePageIndexBox="转到 " UrlPagingTarget="_self" UrlPageIndexName="p" UrlPageSizeName="s"
                                                UrlPaging="True" PageIndexBoxClass="flattext" ShowPageIndex="True" PageSize="50"
                                                SubmitButtonClass="flatbutton" SubmitButtonText=" GO " TextAfterPageIndexBox=" 页 "
                                                Wrap="False">
                                            </webdiyer:AspNetPager>
                                        </div>
                                        <div class="grid">
                                            <div class="hor-scroll">
                                                <div align="center" class="hshop_class">
                                                    <label runat="server" id="lbpname" style="font-size: 12px; color: #EA7601;">
                                                        配送费规则管理
                                                    </label>
                                                </div>
                                                <div style="margin-bottom: 15px;">
                                                    <asp:GridView ID="rptsubItem" runat="server" CssClass="GridViewStyle" AutoGenerateColumns="False"
                                                        OnRowCommand="GridView1_RowCommand" OnRowCancelingEdit="GridView_RowCancelingEdit"
                                                        OnRowEditing="GridView_RowEditing" OnRowUpdating="GridView_RowUpdating">
                                                        <Columns>
                                                            <asp:TemplateField HeaderText="编号">
                                                                <ItemStyle HorizontalAlign="Center" Width="5%" />
                                                                <ItemTemplate>
                                                                    <asp:Label runat="server" ID="lb_id" Text='<%# Eval("rid") %>'></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                              <asp:TemplateField HeaderText="时间" Visible="false">
                                                                <ItemStyle HorizontalAlign="Center" Width="20%" />
                                                                <ItemTemplate>
                                                                    <%#Eval("ReveVar1")%>～<%#Eval("ReveVar2")%>
                                                                </ItemTemplate>
                                                                <EditItemTemplate>
                                                                    <epc:TextBox runat="server" ID="tbReveVar1" onfocus="timeinitBythis(this);" Text='<%#Eval("ReveVar1")%>' Width="70"></epc:TextBox>～<epc:TextBox Text='<%#Eval("ReveVar2")%>' onfocus="timeinitBythis(this);"  runat="server" ID="tbReveVar2" Width="70"></epc:TextBox>公里
                                                                </EditItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText="距离范围">
                                                                <ItemStyle HorizontalAlign="Center" Width="20%" />
                                                                <ItemTemplate>
                                                                    <%#Eval("distancestart")%>～<%#Eval("distanceend")%>公里
                                                                </ItemTemplate>
                                                                <EditItemTemplate>
                                                                    <epc:TextBox runat="server" ID="tbdistancestart" Text='<%#Eval("distancestart")%>' Width="70"></epc:TextBox>～<epc:TextBox Text='<%#Eval("distanceend")%>' runat="server" ID="tbdistanceend" Width="70"></epc:TextBox>公里
                                                                </EditItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText="基础运费">


                                                                <ItemStyle HorizontalAlign="Center" Width="10%" />
                                                                <ItemTemplate>
                                                                    <%#Eval("ReveFloat1")%>元
                                                                </ItemTemplate>
                                                                <EditItemTemplate>
                                                                    <epc:TextBox ID="tbReveFloat1" Width="60" Text='<%#Eval("ReveFloat1")%>' runat="server"></epc:TextBox>元
                                                                </EditItemTemplate>



                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="每公里增加">
                                                                <ItemStyle HorizontalAlign="Center" Width="10%" />
                                                                <ItemTemplate>
                                                                    <%#Eval("sendmoney")%>元
                                                                </ItemTemplate>
                                                                <EditItemTemplate>
                                                                    <epc:TextBox ID="tbsendmoney" Width="60" Text='<%#Eval("sendmoney")%>' runat="server"></epc:TextBox>元
                                                                </EditItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:CommandField HeaderText="编辑" ShowEditButton="True" />
                                                            <asp:TemplateField HeaderText="操作">
                                                                <ItemStyle HorizontalAlign="Center" Width="5%" />
                                                                <ItemTemplate>
                                                                    <asp:LinkButton CommandName="del" CommandArgument='<%# Eval("rid")%>' OnClientClick="return DelConfirm();"
                                                                        runat="server" ID="delNew">删除</asp:LinkButton>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                        </Columns>
                                                    </asp:GridView>
                                                </div>
                                                <div id="nodata" runat="server" style="display: none;">
                                                    没有任何数据!
                                                </div>
                                                <div align="center" class="hshop_class">
                                                    <label runat="server" id="lbadd" style="font-size: 12px;">
                                                        添加配送员班次
                                                    </label>
                                                </div>
                                                <div style="text-align: center">
                                                    <table style="clear: both; width: 100%; text-align: left;">
                                                        <tr>

                                                            <td style="width: 50%; text-align: left; padding-left: 10px;">
                                                              范围：<epc:TextBox runat="server" ID="tbdistancestart" Width="70"></epc:TextBox>～<epc:TextBox runat="server" ID="tbdistanceend" Width="70"></epc:TextBox>公里
                                                                <div style="display:none;">
                                                            时间：<epc:TextBox runat="server" ID="tbReveVar1" Width="80px" onfocus="timeinit('tbReveVar1');"
                                                                                        class="equired-entry input-text" RequiredFieldType="营业时间"></epc:TextBox>至<epc:TextBox
                                                                                            runat="server" ID="tbReveVar2" Width="80px" onfocus="timeinit('tbReveVar2');" class="required-entry input-text"
                                                                                             RequiredFieldType="营业时间"></epc:TextBox>
                                                                                    <span>
                                                                                        <fon color="red">注意：请选择分钟，如：1:00</fon>
                                                                                    </span>
                                                            </div>
                                                            
                                                            </td>




                                                            <td style="width: 50%; text-align: left; padding-left: 10px;">基础运费：
                                                                <epc:TextBox runat="server" ID="tbReveFloat1" Width="60"></epc:TextBox>元&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;每公里增加：<epc:TextBox runat="server" ID="tbsendmoney" Text="0" Width="60"></epc:TextBox>元
                                                            </td>
                                                        </tr>

                                                        <tr>
                                                            <td colspan="" style="text-align: left;padding-left: 10px;">
                                                              
                                                            
                                                            </td>
                                                            <td colspan="" style="text-align: center;">
                                                                <asp:Button ID="btSave" runat="server" CssClass="button_1"
                                                                    OnClick="btSave_Click" Text="保存"></asp:Button>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="scott">
                                            <webdiyer:AspNetPager runat="server" ID="AspNetPager2" CloneFrom="AspNetPager1">
                                            </webdiyer:AspNetPager>
                                        </div>
                                </ContentTemplate>
                            </asp:UpdatePanel>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <uc2:Foot runat="server" ID="FootUC" />

          <div class="time_div" id="timediv" style="display: none">
            <div class="time_div_top">
            </div>
            <div class="time_div_con">
                <div style="clear: both; font-size: 12px; border-bottom: 1px solid #ccc; padding-left: 10px; padding-bottom: 5px;">
                    <h1 style="float: right; padding-right: 5px; cursor: pointer; font-size: 12px;" onclick="$('#timediv').hide()">关闭</h1>
                    请选择时间
                </div>
                <div class="con_left">
                    <h1>时
                    </h1>
                    <div style="border-right: 2px solid #CCC; height: 110px;">
                        <ul class="key_ul">
                            <li onclick="sethour(this)">0</li>
                            <li onclick="sethour(this)">1</li>
                            <li onclick="sethour(this)">2</li>
                            <li onclick="sethour(this)">3</li>
                            <li onclick="sethour(this)">4</li>
                            <li onclick="sethour(this)">5</li>
                            <li onclick="sethour(this)">6</li>
                            <li onclick="sethour(this)">7</li>
                            <li onclick="sethour(this)">8</li>
                            <li onclick="sethour(this)">9</li>
                            <li onclick="sethour(this)">10</li>
                            <li onclick="sethour(this)">11</li>
                            <li onclick="sethour(this)">12</li>
                            <li onclick="sethour(this)">13</li>
                            <li onclick="sethour(this)">14</li>
                            <li onclick="sethour(this)">15</li>
                            <li onclick="sethour(this)">16</li>
                            <li onclick="sethour(this)">17</li>
                            <li onclick="sethour(this)">18</li>
                            <li onclick="sethour(this)">19</li>
                            <li onclick="sethour(this)">20</li>
                            <li onclick="sethour(this)">21</li>
                            <li onclick="sethour(this)">22</li>
                            <li onclick="sethour(this)">23</li>
                        </ul>
                    </div>
                </div>
                <div class="con_right">
                    <h1>分</h1>
                    <ul class="key_ul" style="margin-left: 7px;">
                        <li onclick="setminute(this)">00</li>
                        <li onclick="setminute(this)">15</li>
                        <li onclick="setminute(this)">30</li>
                        <li onclick="setminute(this)">45</li>
                    </ul>
                </div>
            </div>
            <div class="time_div_bottom">
            </div>
        </div>
    </form>
</body>
</html>
